package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.vo.AVipUserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AVipUserMapper;
import com.ruoyi.system.domain.AVipUser;
import com.ruoyi.system.service.IAVipUserService;

/**
 * 会员用户Service业务层处理
 *
 * @author gf
 * @date 2025-01-01
 */
@Service
public class AVipUserServiceImpl implements IAVipUserService {
    @Autowired
    private AVipUserMapper aVipUserMapper;

    /**
     * 查询会员用户
     *
     * @param id 会员用户主键
     * @return 会员用户
     */
    @Override
    public AVipUser selectAVipUserById(Long id) {
        return aVipUserMapper.selectAVipUserById(id);
    }

    /**
     * 查询会员用户列表
     *
     * @param aVipUser 会员用户
     * @return 会员用户
     */
    @Override
    public List<AVipUser> selectAVipUserList(AVipUser aVipUser) {
        return aVipUserMapper.selectAVipUserList(aVipUser);
    }

    /**
     * 新增会员用户
     *
     * @param aVipUser 会员用户
     * @return 结果
     */
    @Override
    public int insertAVipUser(AVipUser aVipUser) {
        aVipUser.setCreateTime(DateUtils.getNowDate());
        return aVipUserMapper.insertAVipUser(aVipUser);
    }

    /**
     * 修改会员用户
     *
     * @param aVipUser 会员用户
     * @return 结果
     */
    @Override
    public int updateAVipUser(AVipUser aVipUser) {
        aVipUser.setUpdateTime(DateUtils.getNowDate());
    return aVipUserMapper.updateAVipUser(aVipUser);
    }

    /**
     * 批量删除会员用户
     *
     * @param ids 需要删除的会员用户主键
     * @return 结果
     */
    @Override
    public int deleteAVipUserByIds(Long[] ids) {
        return aVipUserMapper.deleteAVipUserByIds(ids);
    }

    /**
     * 删除会员用户信息
     *
     * @param id 会员用户主键
     * @return 结果
     */
    @Override
    public int deleteAVipUserById(Long id) {
        return aVipUserMapper.deleteAVipUserById(id);
    }

    /**
     * 批量逻辑删除会员用户
     *
     * @param ids 需要删除的会员用户主键
     * @return 结果
     */
    @Override
    public int logicDeleteAVipUserByIds(Long[] ids) {
        return aVipUserMapper.logicDeleteAVipUserByIds(ids);
    }
    /**
     * 逻辑删除会员用户信息
     *
     * @param id 会员用户主键
     * @return 结果
     */
    @Override
    public int logicDeleteAVipUserById(Long id) {
        return aVipUserMapper.logicDeleteAVipUserById(id);
    }

    @Override
    public List<AVipUserVO> selectAVipUserXcxList() {
        return aVipUserMapper.selectAVipUserXcxList();
    }

}
